package com.diors.game.engine.arpg.aoi.orthogonal;

import java.util.List;

/**
 * 十字链表工具类
 * @author	darren.ouyang <ouyang.darren@gmail.com>
 * @date	2013年12月6日
 * @version 1.0
 * @copyright Copyright (c) 2013, darren.ouyang
 */
public class OrthogonalListUtils 
{
	
	private final static OrthogonalListUtils instance = new OrthogonalListUtils();
	
	private OrthogonalListUtils (){}
	
	public static OrthogonalListUtils getInstance ()
	{
		return instance;
	}

	public void add (OrthogonalList ol, OrtAoiEntity entity)
	{
		int x = entity.getX();
		int y = entity.getY();
		
	}
	
	public void leave (OrthogonalList ol, OrtAoiEntity entity)
	{
		
	}
	
	public void move (OrthogonalList ol, OrtAoiEntity entity, int x, int y)
	{
		
	}
	
	private OrthogonalListPoint getPoint (OrthogonalList ol, int value)
	{
		List<OrthogonalListPoint> list = ol.getxList();
		for (OrthogonalListPoint point : list)
		{
			if (point.getValue() == value)
				return point;
		}
		
		OrthogonalListPoint point = new OrthogonalListPoint(value);
		// TODO:
		return point;
	}
	
}
